<template>
  <Table :columns="columns" :data="inspectItemInfoList"></Table>
</template>

<script>
  export default {
    name: 'inspect-item',
    data() {
      return {
        columns: [{
          key: 'index',
          width: 50,
          align: 'center'
        }, {
          title: '巡检项描述',
          key: 'inspectItemDesc',
          align: 'center'
        }, {
          title: '巡检项阈值',
          key: 'inspectItemThresholds',
          align: 'center'
        }, {
          title: '巡检项实际值',
          key: 'inspectItemActualValue',
          align: 'center'
        }, {
          title: '巡检项结果',
          align: 'center',
          render: (h, params) => {
            if (params.row.inspectItemResult === '正常') {
              return h('span', {
                style: {
                  color: '#65beb2'
                }
              }, '正常')
            } else if (params.row.inspectItemResult === '异常') {
              return h('span', {
                style: {
                  color: '#e45049'
                }
              }, '异常')
            }
          }
        }]
      }
    },
    props: {
      inspectItemInfoList: {
        default: []
      }
    },
    mounted() {
    }
  }
</script>

<style rel="stylesheet/scss" lang="scss" scoped>

</style>
